JENKINS_VERSION="latest"
###
# Automatic install docker with script
# @see <a href="https://hub.docker.com/r/jenkinsci/blueocean/tags">Installation on CentOS</a>
##
#curl -fsSL https://get.docker.com/ | sh

# pull jenkins image
#docker pull jenkinsci/blueocean:$JENKINS_VERSION

# local jenkins home
#mkdir -p /usr/local/docker/jenkins
#chown 1000 /usr/local/docker/jenkins

# start jenkins as deamon
#--rm \
docker run -u root \
--restart on-failure \
--name jenkins \
--privileged=true \
-p 38080:8080 \
-p 50000:50000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/local/docker/jenkins:/var/jenkins_home \
-v /usr/bin/docker:/usr/bin/docker \
-v /root/boot:/root/boot \
-v /root/lib:/root/lib \
-v /etc/docker:/etc/docker \
-v /etc/localtime:/etc/localtime \
-d jenkinsci/blueocean:$JENKINS_VERSION
